detectWebSQL.detectStorageAsync(this._uniqueKey, (error, load) => { this._webSqlDetectCompleted = true;
this._persistence = load;
if (this._indexedDBDetectCompleted)
private _detectCompleted() { var loadingFromPersistence = this._persistence && this._persistence.editedUTC > this._domStorage.editedUTC;
var sourceLoad = loadingFromPersistence ? this._persistence : this._domStorage;
var targetLoad = loadingFromPersistence ? this._domStorage : this._persistence;
console.log('loadingFromPersistence: ' + loadingFromPersistence, sourceLoad, targetLoad); this._callbacks.detectionComplete(
var byFullPath: { [fullPath: string]: { [property: string]: string; }; } = {}; totalFileCount = fileCount;
file: (fullPath: string, values: { [name: string]: string; }) => { byFullPath[fullPath] = values;
this._callbacks.loadProgress(totalFileCount || 140, loadedFileCount, fullPath);
completed: (sourceUpdater: storage.attached.UpdateStorage) => { throw new Error('Something wrong'); this._callbacks.loadComplete(
targetLoad.migrate(sourceLoad.editedUTC, byFullPath, (err, targetUpdater) => { this._callbacks.loadComplete(
this._callbacks.loadComplete(
loadingFromPersistence ? targetUpdater : sourceUpdater,
loadingFromPersistence ? sourceUpdater : targetUpdater);
failed: (error: Error) => {